﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using IndexMarkSilverlightClient;

namespace IndexMarkSilverlightClient.IndexMarkServiceReference
{
    public partial class Respondent
    {

        public bool Check { get; set; }

        public string ShortName
        {
            get
            {
                return this.Person.LastName + " " + this.Person.FirstName[0] + "." + this.Person.Patronymic[0] + ".";
            }
        }

        public string FullName
        {
            get
            {
                return this.Person.LastName + " " + this.Person.FirstName + " " + this.Person.Patronymic;
            }
        }

        public string Job
        {
            get
            {
                return this.Position + " " + this.Status + " ст.";
            }
        }

        /// <summary>
        /// Возможность редактирования респондента
        /// </summary>
        public bool HasEdit
        {
            get;
            set;
        }

        public override bool Equals(object obj)
        {
            return this.IDRespondent == (obj as Respondent).IDRespondent;
        }

        public override string ToString()
        {
            return ShortName;
        }

        public override int GetHashCode()
        {
            return 0;
        }

    }
}
